package com.example.hcd.datamanage;

import com.example.hcd.R;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;

enum ItemStyle {
	// 标题加输入框
	TITLE_EDITTEXT_10,
	// 标题加输入框内容
	TITLE_EDITTEXT_200,
	// 标题加下拉框
	TITLE_XIALA,
	// 标题加图片按钮加文字说明
	TITLE_PICBTN_TEXT,
	// 标题加图片按钮
	TITLE_PICKBTN,
	// 输入框加文字加输入框架按钮
	EDITTEXT_TEXT_EDITTEXT_PICBTN

}

public class ItemStyleManage {

	private ItemStyle style;
	
	private String title;
	
	private String content;
	
	int picBtn;
	
	boolean isTouch;
	
	private Context context;
	
	public ItemStyleManage(Context context)
	{
		this.context = context;
	}

	public View getViewByStyle(ItemStyle style) {
		
		int id = 0;
		switch (style) {
		case TITLE_EDITTEXT_10:
			id = R.layout.title_edit_item;
			break;
		case TITLE_EDITTEXT_200:
			id = R.layout.title_edit_item;
			break;
		case TITLE_XIALA:
			id = R.layout.title_edit_item;
			break;
		case TITLE_PICBTN_TEXT:
			id = R.layout.title_edit_item;
			break;
		case TITLE_PICKBTN:
			id = R.layout.title_edit_item;
			break;
		case EDITTEXT_TEXT_EDITTEXT_PICBTN:
			id = R.layout.title_edit_item;
			break;

		default:
			break;
		}
		
		LayoutInflater inflater = LayoutInflater.from(context);
		
		return (View)inflater.inflate(id, null);
	}

}
